#ifndef _PackedArray_h
#define _PackedArray_h

#include "CxxUtils.h"
#include "LangUtils.h"

class DoOpPackedArray
{
public: 
	class ds_packedarray : public _DoOperator
	{
	protected: 
		ds_packedarray(const ds_packedarray &);
		ds_packedarray& operator=(const ds_packedarray &);
	public: 
		ds_packedarray() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_setpacking : public _DoOperator
	{
	protected: 
		ds_setpacking(const ds_setpacking &);
		ds_setpacking& operator=(const ds_setpacking &);
	public: 
		ds_setpacking() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_currentpacking : public _DoOperator
	{
	protected: 
		ds_currentpacking(const ds_currentpacking &);
		ds_currentpacking& operator=(const ds_currentpacking &);
	public: 
		ds_currentpacking() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_length : public _DoOperator
	{
	protected: 
		ds_length(const ds_length &);
		ds_length& operator=(const ds_length &);
	public: 
		ds_length() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_get : public _DoOperator
	{
	protected: 
		ds_get(const ds_get &);
		ds_get& operator=(const ds_get &);
	public: 
		ds_get() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_getinterval : public _DoOperator
	{
	protected: 
		ds_getinterval(const ds_getinterval &);
		ds_getinterval& operator=(const ds_getinterval &);
	public: 
		ds_getinterval() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_aload : public _DoOperator
	{
	protected: 
		ds_aload(const ds_aload &);
		ds_aload& operator=(const ds_aload &);
	public: 
		ds_aload() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_copy : public _DoOperator
	{
	protected: 
		ds_copy(const ds_copy &);
		ds_copy& operator=(const ds_copy &);
	public: 
		ds_copy() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_forall : public _DoOperator
	{
	protected: 
		ds_forall(const ds_forall &);
		ds_forall& operator=(const ds_forall &);
	public: 
		ds_forall() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	static void push(_DoDictionaryMultimap& dict) {
		dict.put(CRefPtr< _DoObject >(new DoName("packedarray")), CRefPtr< _DoObject >(new ds_packedarray()));
		dict.put(CRefPtr< _DoObject >(new DoName("setpacking")), CRefPtr< _DoObject >(new ds_setpacking()));
		dict.put(CRefPtr< _DoObject >(new DoName("currentpacking")), CRefPtr< _DoObject >(new ds_currentpacking()));
		dict.put(CRefPtr< _DoObject >(new DoName("length")), CRefPtr< _DoObject >(new ds_length()));
		dict.put(CRefPtr< _DoObject >(new DoName("get")), CRefPtr< _DoObject >(new ds_get()));
		dict.put(CRefPtr< _DoObject >(new DoName("getinterval")), CRefPtr< _DoObject >(new ds_getinterval()));
		dict.put(CRefPtr< _DoObject >(new DoName("aload")), CRefPtr< _DoObject >(new ds_aload()));
		dict.put(CRefPtr< _DoObject >(new DoName("copy")), CRefPtr< _DoObject >(new ds_copy()));
		dict.put(CRefPtr< _DoObject >(new DoName("forall")), CRefPtr< _DoObject >(new ds_forall()));
	}
};

#endif
